// DrawObjectCtrler.h: interface for the CDrawObjectCtrler class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DRAWOBJECTCTRLER_H__CC63E8E4_4C45_4112_A592_DBF28928D02E__INCLUDED_)
#define AFX_DRAWOBJECTCTRLER_H__CC63E8E4_4C45_4112_A592_DBF28928D02E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CDrawObjectCtrler : public CObject  
{
public:
	CDrawObjectCtrler();	// construction function
	virtual ~CDrawObjectCtrler();

private:
	COLORREF m_PenColor;	// the color of the pen.
	int		m_iPenWidth;	// the width of the pen.
	BOOL	m_bFill;		// whether fill or not.
	long	m_PenStyle;		// the style of the pen.

protected:
	CRect	m_DrawRect;		// the client drawing rect with logical coordination.

public:
	virtual CRect GetDrawingRect();
	long	m_TaskTyle;		// the object type that will be drawn.

	void SetColor(COLORREF color);		// set the color of the pen.
	COLORREF GetColor ();				// get the color of the pen.

	void SetPenWidth(int width)			// set the width of the pen.
	{ m_iPenWidth = width; };
	int  GetPenWidth ()					// get the width of the pen.
	{ return  m_iPenWidth; };

	void SetFill (BOOL fill)			// set whether fill or not.
	{ m_bFill = fill; };
	BOOL GetFill ()						// get the current filling state.
	{ return m_bFill; };

	void SetPenStyle(long style)		// set the style of the pen.
	{ m_PenStyle = style; };
	long GetPenStyle()					// get the style of the pen.
	{ return m_PenStyle; }

	//// complete the drawing of the object
	//  this function will usually be called at the end of the drawing
	//	to complete the drawing process.
	virtual void DrawObject(CDC* pDC) {};

	//// this function will usually be called in the process of drawing
	//  when the client's moving mouse as drawing, the function will dynamically
	//  draw a line to the current mouse point to indicate the line.
	virtual void MoveAt(CDC* pDC, long x, long y) {};

	virtual	void  EndPoint(CDC* pDC) {};

	//// set the first point of drawing.
	//  restore the point (x, y) to m_lStartx and m_lStarty to signal the 
	//  start point. If return false, end the drawing.
	virtual void  StartPoint(long x, long y){};

	virtual int AddPoint(CDC *pDC, long x, long y){return 0;};

	virtual BOOL CannotFormClose() {return FALSE;};
};

#endif // !defined(AFX_DRAWOBJECTCTRLER_H__CC63E8E4_4C45_4112_A592_DBF28928D02E__INCLUDED_)
